/**
 * $Id: MSLView.m 29 2008-01-17 07:10:07Z robertsaenz $
 */
#import <Foundation/Foundation.h>
#import <UIKit/CDStructures.h>
#import <UIKit/UIKit.h>

#import "MobileShoppingListApplication.h"

@implementation MSLView

- (id)initWithFrame:(struct CGRect)frame {
	self = [super initWithFrame:frame];
	sl = [MobileShoppingListApplication sharedInstance];
	cells = [[NSMutableArray alloc] init];
	return self;
}

- (ViewType) getViewType {
	return viewType;
}

- (NSString *) getViewTitle {
	return viewTitle;
}

- (void) clearTable {
	[cells removeAllObjects];
	[self clearAllData];
}

- (int) numberOfRowsInTable: (UITable*)table {
	return cells.count;
}

- (void) deleteSelectedItem {
	[cells removeObjectAtIndex: [self selectedRow]];
	[self reloadData];
}

@end
